package com.jin.service.Impl;

import com.jin.mapper.ApproveInfoMapper;
import com.jin.pojo.ApproveInfo;
import com.jin.service.ApproveInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApproveInfoServiceImpl implements ApproveInfoService {

    @Autowired
    ApproveInfoMapper approveInfoMapper;

    @Override
    public int insertApproveInfo(ApproveInfo approveInfo) {
        return approveInfoMapper.insertApproveInfo(approveInfo);
    }

    @Override
    public int deleteApproveInfo(Integer id) {
        return approveInfoMapper.deleteApproveInfo(id);
    }

    @Override
    public int updateApproveInfo(ApproveInfo approveInfo) {
        return approveInfoMapper.updateApproveInfo(approveInfo);
    }

    @Override
    public ApproveInfo getApproveInfoById(Integer id) {
        ApproveInfo approveInfoById = approveInfoMapper.getApproveInfoById(id);
        System.out.println("serviceImpl+" + approveInfoById);
        return approveInfoById;
    }

    @Override
    public List<ApproveInfo> getApproveInfos() {
        List<ApproveInfo> approveInfos = approveInfoMapper.getApproveInfos();
        return approveInfos;
    }
}
